package com.lanou.bbs.util;

//关闭IO流等其他需要关闭的对象
public class IOClose {
    public static void closeAll(AutoCloseable...closeables){
        if (closeables == null){
            return;
        }
        for (AutoCloseable closeable : closeables) {
            if (closeable != null){
                try {
                    closeable.close();
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }
    }
}
